package sk.ogame.brain.thing;

import sk.ogame.realm.exception.BaseException;

import java.beans.Transient;
import java.util.Set;

/**
 * @author 支绍昆
 * 2023/2/17
 * 事情
 **/
public abstract class Thing {

    private long time = System.currentTimeMillis();
    //上级
    private transient Thing superior = null;
    //下级 前置
    private transient Thing preThings = null;


    /**
     * 可以解决的异常问题
     */
    @Transient
    public abstract Set<Class<? extends BaseException>> couldSolve();

    /**
     * 处理本事情的服务类型
     */
    @Transient
    public abstract Class<? extends ThingService> getDealBeanType();


    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public Thing getSuperior() {
        return superior;
    }

    public void setSuperior(Thing superior) {
        this.superior = superior;
    }

    public Thing getPreThings() {
        return preThings;
    }

    public void setPreThings(Thing preThings) {
        this.preThings = preThings;
    }

}
